﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using LL.Data;

namespace LL.Business
{
    /// <summary>
    /// （临时版本）数据库直接操作接口
    /// 最终为FluentApi版本（SqlBuilder）
    /// </summary>
    public class DbAccessor : ServiceBase
    {
        public int ExcuteNonQuery(string sql, params object[] parameters)
        {
            return DbSession.ExcuteNonQuery(sql, parameters);
        }

        public System.Data.DataTable ExcuteQuery(string sql, params object[] parameters)
        {
            return DbSession.ExcuteQuery(sql, parameters);
        }

        public T ExcuteScalar<T>(string sql, params object[] parameters)
        {
            return DbSession.ExcuteScalar<T>(sql, parameters);
        }

        public DataTable StoredProcdure(string procdureName, params object[] parameters)
        {
            return DbSession.StoredProcdure(procdureName, parameters);
        }
    }
}
